import requests

from common.DBUtil import DBUtil
from common.get_headers_util import get_headers


def get_id():
    DBUtil.uid_db("delete from bs_user where mobile='18999009920';")
    # 添加员工请求
    resp_insert = requests.post(url="http://ihrm2-test.itheima.net/api/sys/user",
                                headers=get_headers(),
                                json={"username": "java之父20", "mobile": "18999009920", "workNumber": "9527"})
    # 组装id
    ihrm_id = resp_insert.json().get("data").get("id")

    return ihrm_id


if __name__ == '__main__':
    print(get_id())
